<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
<link rel="Stylesheet" type="text/css"
	href="<c:url value="/static/css/jquery.ui.css"/>" />
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/common.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/Loading.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/showMsg.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/listBox/jquery.clever.listbox.js"/>"></script>
<script>
	function feetype2currcode() {
		if ($("#fee_type").val() == "HKD") {
			$("#currCode").val("344");
		} else if ($("#fee_type").val() == "CNY") {
			$("#currCode").val("156");
		} else if ($("#fee_type").val() == "GBP") {
			$("#currCode").val("826");
		} else if ($("#fee_type").val() == "USD") {
			$("#currCode").val("840");
		} else if ($("#fee_type").val() == "JPY") {
			$("#currCode").val("392");
		} else if ($("#fee_type").val() == "CAD") {
			$("#currCode").val("124");
		} else if ($("#fee_type").val() == "AUD") {
			$("#currCode").val("036");
		} else if ($("#fee_type").val() == "EUR") {
			$("#currCode").val("978");
		} else if ($("#fee_type").val() == "NZD") {
			$("#currCode").val("554");
		} else if ($("#fee_type").val() == "KRW") {
			$("#currCode").val("410");
		} else if ($("#fee_type").val() == "THB") {
			$("#currCode").val("764");
		} else {
			$("#currCode").val("");
			$("#fee_type").val("");
		}
	}

	function currcode2feetype() {
		if ($("#currCode").val() == "344") {
			$("#fee_type").val("HKD");
		} else if ($("#currCode").val() == "156") {
			$("#fee_type").val("CNY");
		} else if ($("#currCode").val() == "826") {
			$("#fee_type").val("GBP");
		} else if ($("#currCode").val() == "840") {
			$("#fee_type").val("USD");
		} else if ($("#currCode").val() == "392") {
			$("#fee_type").val("JPY");
		} else if ($("#currCode").val() == "124") {
			$("#fee_type").val("CAD");
		} else if ($("#currCode").val() == "036") {
			$("#fee_type").val("AUD");
		} else if ($("#currCode").val() == "978") {
			$("#fee_type").val("EUR");
		} else if ($("#currCode").val() == "554") {
			$("#fee_type").val("NZD");
		} else if ($("#currCode").val() == "410") {
			$("#fee_type").val("KRW");
		} else if ($("#currCode").val() == "764") {
			$("#fee_type").val("THB");
		} else {
			$("#fee_type").val("");
			$("#currCode").val("");
		}
	}

	function fee2amount() {
		$("#amount").val($("#total_fee").val());
	}
	function amount2fee() {
		$("#total_fee").val($("#amount").val());
	}

	
	function addFood(){
        $('#AddFoodForm').form('submit',
        {
            url:'<c:url value='/paytest123/addFood.do'/>', //查询提交路径
            onSubmit:function()//提交按钮相应函数
            {
                    return $('#AddFoodForm').form('validate');
            },
            success:function(data){
               
            },
            error:function(){
                $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                return;
            }
        });
         
    }
</script>
</head>
<body>
	<form id="AddFoodForm" name="AddFoodForm" method="post">

		<p>---------------微信参数---------------</p>
		appid:<input type="text" id="appid" name="appid" value=""> <br>sub_appid:<input
			type="text" id="sub_appid" name="sub_appid" value="">(选填) <br>sub_mch_id:<input
			type="text" id="sub_mch_id" name="sub_mch_id" value=""> <br>device_info:<input
			type="text" id="device_info" name="device_info" value="11111111">
		<br>
		<p>---------------商品参数---------------</p>
		body:<input type="text" id="body" name="body" value="刷卡 测试"> <br>detail:<input
			type="text" id="detail" name="detail" value="刷卡 测试 订单描述"> <br>attach:<input
			type="text" id="attach" name="attach" value="刷卡 测试 订单额外描述"> <br>goods_tag:<input
			type="text" id="goods_tag" name="goods_tag" value="">(是否参与红包等活动)
		<br>
		<p>---------------二维码编号---------------</p>
		auth_code:<input type="text" id="auth_code" name="auth_code" value="">
		<br>
		<p>---------------商户号---------------</p>
		mch_id:<input type="text" id="mch_id" name="mch_id" value="">(WeChat)
		<br>
		<p>---------------金额---------------</p>
		total_fee:<input type="text" id="total_fee" name="total_fee" value="1"
			onchange="fee2amount()">(WeChat) <br>
		<p>---------------币种---------------</p>
		fee_type:<input type="text" id="fee_type" name="fee_type" value="CNY"
			onchange="feetype2currcode()" />(WeChat) <br> <br> <br>
		<a href="#" onclick="addFood()">添加</a>
	</form>
</body>
</html>
